<!DOCTYPE HTML>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>html5记录刷新（访问）次数</title>
<body>
<header>
	<base href="http://www.youban.com/up/index/img/" />
</header>
<canvas id="myCanvas" width="200" height="100"></canvas>
<footer>This document was written in 2010</footer>
<ul>
<li>Username <bdi>Bill<bdi>:80 points</li>
<li>Username <bdi>Steve</bdi>: 78 points</li>
</ul>
<span>刷新页面记录访问次数：</span>
</body>
<script type="text/javascript">
	if (localStorage.pagecount)
	{
		localStorage.pagecount=Number(localStorage.pagecount) +1;
	}
	else
	{
		localStorage.pagecount=1;
	}
	document.write("Visits "+ localStorage.pagecount + " time(s).");
</script>
</html>